<template>
  <div class="login">
    <h2>内师学生管理系统</h2>
    <el-form  :model="formLabelAlign">
      <el-form-item label="用户名">
        <el-input v-model="fromData.username"></el-input>
      </el-form-item>
      <el-form-item label="密码">
        <el-input v-model="fromData.password"></el-input>
      </el-form-item>
      <el-form-item >
       <el-button type="primary" @click="login" >登录</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'Login-name',
  data () {
    return {
      fromData: {
        username: '',
        password:''
      }
    }
  },
  methods: {
    login () { 
      this.$router.push('/home/student')
    }
  }
}

</script>
<style scoped>
  h2{
    text-align: center;
  }
  .login{
    width: 30%;
    margin: 0 auto;
    border: 1px solid red;
    padding: 5%;
    margin-top: 10%;
  }
  .el-button{
    width: 100%;
  }
</style>